package com.motorola.dp.jenkinsmonitor.model.util.dom;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.motorola.dp.jenkinsmonitor.service.util.dom.DomAttributeProcessor;

/**
 *
 * Used for mapping instance fields to DOM attributes. E.g.:
 *
 *     <node attr="value"/>
 *
 * can be mapped as:
 *
 *     @DomEntity(name="node")
 *     class Node {
 *         @DomAttribute
 *         String attr;
 *     }
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@DomAnnotation(processor = DomAttributeProcessor.class)
public @interface DomAttribute {

    String NAME_UNSPECIFIED = "[unspecified]";

    String name() default NAME_UNSPECIFIED;
}
